This application is based on Japanese Patent Application No. 2001-2615 filed on Jan. 10, 2001 the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a microcomputer having a function for receiving data and a processing method for received data.
2. Description of the Related Art
It is now an ordinary matter that data communications are conducted among a plurality of microcomputers. For example, a vehicle is usually loaded with electronic control units (hereinafter referred to as ECUs) in the engine drive system, running safety system, entertainment system and other various functional systems to constitute thereby a mobile computer system. Therefore, data communications among such ECUs are effective to realize the optimum control in various systems of a vehicle. For such data communications, there is provided a constitution in which the ECUs loaded in various functional systems are mutually connected via a network such as intra-vehicle LAN (Local Area Network).
As shown in FIG. 4, for example, an ECU 100 is loaded in a vehicle. An ordinary ECU is provided with an input/output circuit and a microcomputer but it is also provided for network communication with a driver 110 connected to a LAN 90 as one of the input/output circuit. A microcomputer 120 of the ECU 100 includes a CPU 130, a ROM 140, a RAM 150 and a LAN block 160. The LAN block 160 has a function to fetch communication data from the intra-vehicle LAN 90 via a driver 110 and moreover to transmit the communication data to the intra-vehicle LAN 90.
Reception of the communication data via the LAN block 160 will be explained in further detail. The LAN block 160 is provided with a message box 160a, a protocol controller 160b and a filter circuit 160c. In this example, the message box 160a has sixteen blocks. The communication data of the intra-vehicle LAN 90 is constituted of identification information (hereinafter referred to as xe2x80x9cIDxe2x80x9d) indicating an address of transmission source ECU and a kind of data or the like and communication data itself and thereby it is called a message. The message box 160a has a structure to store the ID and data itself in pair. In FIG. 4, each message box 160a is given the numbering from xe2x80x9c0xe2x80x9d to xe2x80x9c15xe2x80x9d for the convenience of explanation.
A message fetched by the driver 110 from the network is first decoded by the protocol controller 160b and is selected by the filter circuit 160c. The filter circuit 160c is a logic circuit to select the message based on the ID explained above. Thereby, the message is stored in any one of the message box 160a given the numbering from xe2x80x9c0xe2x80x9d to xe2x80x9c15xe2x80x9d.
The CPU 130 reads the message from the message box 160a on the basis of an interruption signal indicating message reception from the LAN block 160 and stores this message, for example, to the RAM 150 in order to execute the process depending on such message. However, the CPU 130 does not operate depending on only the message from the intra-vehicle LAN 90 and operates depending on the signals from the other input circuits. Accordingly, the CPU 130 preferentially executes the process which is in the higher real-time processing level by conducting the process change-over operation such as the task dispatch or the like. As a result, when the process priority of the message received is relatively lower, even if the interruption signal is received, the message cannot always be obtained immediately from the message box 160a. 
Meanwhile, a communication rate has been much improved in the intra-vehicle LAN 90. For example, this communication rate has reached several Mbps. Therefore, here is generated an event that the next message is received before the CPU 130 fetches a message from the one message box 160a and thereby the next message is over-written in the message box 160a during the fetching process of message. That is, the CPU 130 accidentally generates, in a certain case, a failure of the message fetching process. Such failure of the message fetching process is not desirable from the viewpoint of performance of the CPU 130 because it surely results in deterioration of control performance thereof. For prevention of the failure of the message fetching process, it is very effective that a plurality of message boxes are assigned, for example, to store groups of the messages having comparatively lower process priority and the messages are stored in the vacant storage areas among a plurality of message boxes. In FIG. 4, thirteen message boxes 160a which are identified with the numbering from xe2x80x9c1xe2x80x9d to xe2x80x9c13xe2x80x9d are assigned, for example, for the groups of messages having comparatively lower process priority, the messages are selected by the filter circuit 160c and the selected messages are stored in the vacant message boxes 160a among the thirteen message boxes 160a. Thereby, if a delay time is generated in the read operation of message by the CPU 130, generation of the failure in the message fetching process is reduced because the thirteen messages in maximum are stored.
However, since the number of message boxes is restricted, the message boxes are probably used completely when the received messages are spread to various kinds of data and the communication rate is comparatively higher. Here, it is considered to increase the number of message boxes to provide a countermeasure, but it is actually difficult to realize because of the following reasons. The required number of message boxes is different depending on the frequency of message reception and moreover on the number of messages as the reception object. Accordingly, the structure of the LAN block becomes large in size and thereby a size of the ECU becomes large when the there is no limit to the number of message boxes used for a particular application. In addition, expansion in size of the message box is related only to expansion of a communication function and does not make any contribution to improvement of flexibility of a microcomputer itself. Therefore, such expansion of the message box results in an increase in manufacturing costs.
An object of the present invention is to overcome the problems explained above.
Another object of the present invention is to reduce generation frequency of failure in the communication data fetching process.
The other object of the present invention is to eliminate occurrence of such failure in the communication data fetching process.
The still other object of the present invention is to reduce generation frequency of failure in the communication data fetching process without any expansion of storage region of a data storage means, for example, a message box.
According to a profile of the present invention, a microcomputer is provided with a communication means, a data storage means and a process executing means. Moreover, a transfer means transfers communication data stored in the particular storage region of the data storage means. A transfer destination is selected to a temporary storage means which is used by the process executing means. This transfer means transfer the communication data directly without passing the process executing means in a manner that the storage region of the transfer destination is never overlapped. The process executing means basically reads the communication data from the data storage region to execute the processes based on the relevant communication data but executes the processes based on the communication data stored in the particular storage region depending on the communication data stored in the temporary storage means. Since the transfer process is executed without the process executing means, the transfer process can be done independent of various processes executed by the process executing means. Moreover, since communication data is transferred without any overlapping of the storage region in the transfer destination, over-writing of communication data is prevented during the transfer operation of communication data.
The communication means is provided with at least a data receiving function. Moreover, the communication means is permitted to include both receiving function and transmission function. The transfer process can be executed during the period until the next communication data is over-written from the time when the communication data is stored in the particular storage region of the data storage means.
Here, the number of times of communication data transfer may be limited in view of preventing that the transfer data excessively occupies the storage region of the temporary storage means. Moreover, it is possible to introduce the construction to notify the number of times of transfer or that the number of times of transfer has reached the preset value. In addition, information to control the notification process may be held in the transfer means. Further, it is possible to form a constitution to change the upper limit value in the number of times of transfer and the preset value from the process executing means.